package gomz.pres.question;

import gomz.pres.CheckBoxList;
import gomz.pres.GUIMain;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Image;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSlider;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;

/**
 * Diese Klasse erstellt das GUI der Fragen in der Fragensicht
 * 
 * @author Edis Dilji
 */

public class GUIQQuestion {

	// all the variables for plQuestion
	private JPanel plUserDate;
	private JLabel lbFdate;
	private JTextField tfFdate;
	private JLabel lbFuser;
	private JTextField tfFuser;
	private JLabel lbFcategory;
	private CheckBoxList liFcategory;
	private JScrollPane spFcategory;
	private JButton btFnewCategory;
	private JLabel lbFpublic;
	private JCheckBox cbFpublic;
	private JLabel lbFtitle;
	private JTextField tfFtitle;
	private JLabel lbFquestion;
	private JTextArea taFquestion;
	private JScrollPane spFquestion;
	private JLabel lbFana;
	private JTextArea taFana;
	private JScrollPane spFana;
	private JLabel lbFsyn;
	private JTextArea taFsyn;

	private JScrollPane spFsyn;
	private JLabel lbFback;
	private JTextArea taFback;
	private JScrollPane spFback;
	private JButton btFsave;
	private JButton btFcan;
	private JSlider slFl1;
	private JSlider slFl2;
	private JSlider slFl3;
	private JSlider slFl4;
	private JSlider slFl5;
	private JSlider slFl6;
	private JPanel plSliderLines;
	private ImageIcon imgLine1;
	private ImageIcon imgLine2;
	private ImageIcon imgLine3;
	private ImageIcon imgLine4;
	private JLabel lbLine1;
	private JLabel lbLine2;
	private JLabel lbLine3;
	private JLabel lbLine4;
	private JLabel lbLine5;
	private JLabel lbLine6;

	// all the variables for main panels
	private JPanel plQuestion;
	private JPanel plQuestionNord;
	private JScrollPane spQuestion;

	/**
	 * Erstellt das GUI der Fragensicht in der Home-Ansicht
	 * 
	 * @param categorieList fuellt die Kategorielist
	 * @return gibt das GUI zurueck
	 */
	public JScrollPane getTab(String[] categorieList) {

		// initialize the panels, add to scrollpane and set position
		this.plQuestion = new JPanel();
		this.plQuestionNord = new JPanel();
		this.spQuestion = new JScrollPane(plQuestionNord);
		this.plQuestionNord.setLayout(new BorderLayout());
		this.plQuestionNord.add(plQuestion, BorderLayout.NORTH);
		this.plQuestionNord.setBorder(new EmptyBorder((1 * GUIMain.getAbstand()), 0, (1 * GUIMain.getAbstand()), 0));

		// set background of main panels
		this.plQuestion.setBackground(Color.WHITE);
		this.plQuestionNord.setBackground(Color.WHITE);

		// ********************************************************************************
		// PANEL QUESTION
		// ********************************************************************************

		// initialize the components of question
		this.lbFdate = new JLabel("Erstelldatum:");
		this.tfFdate = new JTextField();
		this.lbFuser = new JLabel("Benutzer:");
		this.tfFuser = new JTextField("hans.user");
		this.lbFcategory = new JLabel("Kategorie:");
		this.liFcategory = new CheckBoxList(categorieList);
		this.spFcategory = new JScrollPane(liFcategory);
		this.btFnewCategory = new JButton("Neue Kategorie");
		this.lbFpublic = new JLabel("\u00d6ffentlich:");
		this.cbFpublic = new JCheckBox();
		this.lbFtitle = new JLabel("Titel:");
		this.tfFtitle = new JTextField("Informatikprojekt");
		this.lbFquestion = new JLabel("Frage:");
		this.taFquestion = new JTextArea("Wie wird das Informatikprojekt?");
		this.spFquestion = new JScrollPane(taFquestion);
		this.lbFana = new JLabel("Analyse:");
		this.taFana = new JTextArea("TextArea Analyse");
		this.spFana = new JScrollPane(taFana);
		this.lbFsyn = new JLabel("Synthese:");
		this.taFsyn = new JTextArea("TextArea Synthese");
		this.spFsyn = new JScrollPane(taFsyn);
		this.lbFback = new JLabel("R\u00fcckmeldung:");
		this.taFback = new JTextArea("TextArea R\u00fcckmeldung");
		this.spFback = new JScrollPane(taFback);
		this.btFsave = new JButton("Speichern");
		this.btFcan = new JButton("Zur\u00fccksetzen");
		this.slFl1 = new JSlider();
		this.slFl2 = new JSlider();
		this.slFl3 = new JSlider();
		this.slFl4 = new JSlider();
		this.slFl5 = new JSlider();
		this.slFl6 = new JSlider();

		// settings for sliders
		this.slFl1.setMajorTickSpacing(1);
		this.slFl1.setMaximum(9);
		this.slFl1.setMinimum(6);
		this.slFl1.setValue(6);
		this.slFl1.setSnapToTicks(true);
		this.slFl1.setMinorTickSpacing(1);
		this.slFl1.setPaintLabels(true);
		this.slFl1.setPaintTicks(true);
		this.slFl2.setMajorTickSpacing(1);
		this.slFl2.setMaximum(9);
		this.slFl2.setMinimum(6);
		this.slFl2.setValue(6);
		this.slFl2.setSnapToTicks(true);
		this.slFl2.setMinorTickSpacing(1);
		this.slFl2.setPaintLabels(true);
		this.slFl2.setPaintTicks(true);
		this.slFl3.setMajorTickSpacing(1);
		this.slFl3.setMaximum(9);
		this.slFl3.setMinimum(6);
		this.slFl3.setValue(6);
		this.slFl3.setSnapToTicks(true);
		this.slFl3.setMinorTickSpacing(1);
		this.slFl3.setPaintLabels(true);
		this.slFl3.setPaintTicks(true);
		this.slFl4.setMajorTickSpacing(1);
		this.slFl4.setMaximum(9);
		this.slFl4.setMinimum(6);
		this.slFl4.setValue(6);
		this.slFl4.setSnapToTicks(true);
		this.slFl4.setMinorTickSpacing(1);
		this.slFl4.setPaintLabels(true);
		this.slFl4.setPaintTicks(true);
		this.slFl5.setMajorTickSpacing(1);
		this.slFl5.setMaximum(9);
		this.slFl5.setMinimum(6);
		this.slFl5.setValue(6);
		this.slFl5.setSnapToTicks(true);
		this.slFl5.setMinorTickSpacing(1);
		this.slFl5.setPaintLabels(true);
		this.slFl5.setPaintTicks(true);
		this.slFl6.setMajorTickSpacing(1);
		this.slFl6.setMaximum(9);
		this.slFl6.setMinimum(6);
		this.slFl6.setValue(6);
		this.slFl6.setSnapToTicks(true);
		this.slFl6.setMinorTickSpacing(1);
		this.slFl6.setPaintLabels(true);
		this.slFl6.setPaintTicks(true);

		// size of all sliders
		this.slFl1.setPreferredSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl1.setMaximumSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl2.setPreferredSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl2.setMaximumSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl3.setPreferredSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl3.setMaximumSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl4.setPreferredSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl4.setMaximumSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl5.setPreferredSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl5.setMaximumSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl6.setPreferredSize(new Dimension(GUIMain.getBtWidth(), 50));
		this.slFl6.setMaximumSize(new Dimension(GUIMain.getBtWidth(), 50));

		// set background of sliders
		this.slFl1.setBackground(Color.WHITE);
		this.slFl2.setBackground(Color.WHITE);
		this.slFl3.setBackground(Color.WHITE);
		this.slFl4.setBackground(Color.WHITE);
		this.slFl5.setBackground(Color.WHITE);
		this.slFl6.setBackground(Color.WHITE);

		// size of scrollpane from list
		this.spFcategory.setPreferredSize(new Dimension(350, 80));
		this.spFcategory.setMaximumSize(new Dimension(350, 80));

		// set background of CheckBox �ffentlich
		this.cbFpublic.setBackground(Color.WHITE);

		// size of scrollpane from textarea
		this.spFquestion.setPreferredSize(new Dimension(500, 80));
		this.spFquestion.setMaximumSize(new Dimension(500, 80));
		this.spFana.setPreferredSize(new Dimension(500, 100));
		this.spFana.setPreferredSize(new Dimension(500, 100));
		this.spFsyn.setPreferredSize(new Dimension(500, 100));
		this.spFsyn.setPreferredSize(new Dimension(500, 100));
		this.spFback.setPreferredSize(new Dimension(500, 100));
		this.spFback.setPreferredSize(new Dimension(500, 100));

		// size of buttons
		this.btFnewCategory.setPreferredSize(new Dimension(GUIMain.getBtWidth(), GUIMain.getBtHeight()));
		this.btFnewCategory.setMaximumSize(new Dimension(GUIMain.getBtWidth(), GUIMain.getBtHeight()));
		this.btFsave.setPreferredSize(new Dimension(GUIMain.getBtWidth() + GUIMain.getAbstand(), GUIMain.getBtHeight()));
		this.btFsave.setMaximumSize(new Dimension(GUIMain.getBtWidth() + GUIMain.getAbstand(), GUIMain.getBtHeight()));
		this.btFcan.setPreferredSize(new Dimension(GUIMain.getBtWidth() + GUIMain.getAbstand(), GUIMain.getBtHeight()));
		this.btFcan.setMaximumSize(new Dimension(GUIMain.getBtWidth() + GUIMain.getAbstand(), GUIMain.getBtHeight()));

		// format TextField Frage
		// true to set formatting
		this.taFquestion.setOpaque(true);
		// user can not edit this JTextArea
		this.taFquestion.setEditable(true);
		// set automatically linewrap
		this.taFquestion.setLineWrap(true);
		// set wrap style word
		this.taFquestion.setWrapStyleWord(true);
		// font
		this.taFquestion.setFont(this.lbFquestion.getFont());

		// format TextArea Analyse
		// true to set formatting
		this.taFana.setOpaque(true);
		// user can not edit this JTextArea
		this.taFana.setEditable(true);
		// set automatically linewrap
		this.taFana.setLineWrap(true);
		// set wrap style word
		this.taFana.setWrapStyleWord(true);
		// font
		this.taFana.setFont(this.lbFana.getFont());

		// format TextArea Synthese
		// true to set formatting
		this.taFsyn.setOpaque(true);
		// user can not edit this JTextArea
		this.taFsyn.setEditable(true);
		// set automatically linewrap
		this.taFsyn.setLineWrap(true);
		// set wrap style word
		this.taFsyn.setWrapStyleWord(true);
		// font
		this.taFsyn.setFont(this.lbFsyn.getFont());

		// format TextArea Rueckmeldung
		// true to set formatting
		this.taFback.setOpaque(true);
		// user can not edit this JTextArea
		this.taFback.setEditable(true);
		// set automatically linewrap
		this.taFback.setLineWrap(true);
		// set wrap style word
		this.taFback.setWrapStyleWord(true);
		// font
		this.taFback.setFont(this.lbFback.getFont());

		// format border und abstand
		this.tfFdate.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGap()));
		this.tfFdate.setPreferredSize(new Dimension(0, GUIMain.getTfheight()));
		this.tfFdate.setMaximumSize(new Dimension(0, GUIMain.getTfheight()));
		this.tfFdate.setForeground(GUIMain.getFontcolorinactive());
		this.tfFdate.setEditable(false);
		this.tfFdate.setBackground(null);
		this.tfFuser.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGap()));
		this.tfFuser.setPreferredSize(new Dimension(100, GUIMain.getTfheight()));
		this.tfFuser.setMaximumSize(new Dimension(0, GUIMain.getTfheight()));
		this.tfFuser.setForeground(GUIMain.getFontcolorinactive());
		this.tfFuser.setEditable(false);
		this.tfFuser.setBackground(null);
		this.tfFtitle.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGap()));
		this.tfFtitle.setPreferredSize(new Dimension(0, GUIMain.getTfheight()));
		this.tfFtitle.setMaximumSize(new Dimension(0, GUIMain.getTfheight()));
		this.spFana.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGapScrollPane()));
		this.spFsyn.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGapScrollPane()));
		this.spFback.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGapScrollPane()));
		this.spFquestion.setBorder(BorderFactory.createCompoundBorder(GUIMain.getBorderColor(), GUIMain.getBorderInGapScrollPane()));
		this.spFana.setBackground(null);
		this.spFsyn.setBackground(null);
		this.spFback.setBackground(null);
		this.spFquestion.setBackground(null);
		this.spFcategory.setBorder(GUIMain.getBorderColor());

		// initialize the images for lines and set size
		this.imgLine1 = new ImageIcon(getClass().getResource("/gomz/img/line1.png"));
		this.imgLine1.setImage(imgLine1.getImage().getScaledInstance(250, 40,Image.SCALE_DEFAULT));
		this.imgLine2 = new ImageIcon(getClass().getResource("/gomz/img/line2.png"));
		this.imgLine2.setImage(imgLine2.getImage().getScaledInstance(250, 40,Image.SCALE_DEFAULT));
		this.imgLine3 = new ImageIcon(getClass().getResource("/gomz/img/line3.png"));
		this.imgLine3.setImage(imgLine3.getImage().getScaledInstance(250, 40,Image.SCALE_DEFAULT));
		this.imgLine4 = new ImageIcon(getClass().getResource("/gomz/img/line4.png"));
		this.imgLine4.setImage(imgLine4.getImage().getScaledInstance(250, 40,Image.SCALE_DEFAULT));

		// initialize the labels for lines
		this.lbLine1 = new JLabel();
		this.lbLine2 = new JLabel();
		this.lbLine3 = new JLabel();
		this.lbLine4 = new JLabel();
		this.lbLine5 = new JLabel();
		this.lbLine6 = new JLabel();

		// set lines to labels
		this.lbLine1.setIcon(imgLine3);
		this.lbLine2.setIcon(imgLine3);
		this.lbLine3.setIcon(imgLine3);
		this.lbLine4.setIcon(imgLine3);
		this.lbLine5.setIcon(imgLine3);
		this.lbLine6.setIcon(imgLine3);

		// scroll speed
		this.spFana.getVerticalScrollBar().setUnitIncrement(GUIMain.getScrollspeed());
		this.spFsyn.getVerticalScrollBar().setUnitIncrement(GUIMain.getScrollspeed());
		this.spFback.getVerticalScrollBar().setUnitIncrement(GUIMain.getScrollspeed());
		this.spFcategory.getVerticalScrollBar().setUnitIncrement(GUIMain.getScrollspeed());
		this.spFquestion.getVerticalScrollBar().setUnitIncrement(GUIMain.getScrollspeed());
		this.spQuestion.getVerticalScrollBar().setUnitIncrement(GUIMain.getScrollspeed());

		// position of username and date
		this.plUserDate = new JPanel();
		this.plUserDate.setBackground(Color.WHITE);
		this.plUserDate.setLayout(new GridBagLayout());
		GridBagConstraints gbc = new GridBagConstraints();
		gbc.fill = GridBagConstraints.HORIZONTAL; // Zellen in x-Achse ausfuellen
		gbc.insets = new Insets(0, GUIMain.getAbstand(), 0,	GUIMain.getAbstand());
		gbc.anchor = GridBagConstraints.NORTHWEST; // Ausrichtung oben

		gbc.gridx = 0;
		gbc.gridy = 0;
		plUserDate.add(lbFuser, gbc);
		gbc.gridx = 1;
		gbc.gridy = 0;
		plUserDate.add(tfFuser, gbc);
		gbc.gridx = 0;
		gbc.gridy = 1;
		gbc.insets = new Insets(GUIMain.getAbstand(), GUIMain.getAbstand(), 0,	GUIMain.getAbstand());
		plUserDate.add(lbFdate, gbc);
		gbc.gridx = 1;
		gbc.gridy = 1;
		plUserDate.add(tfFdate, gbc);

		// position of components for slider
		this.plSliderLines = new JPanel();
		this.plSliderLines.setBackground(Color.WHITE);
		this.plSliderLines.setLayout(new GridBagLayout());
		GridBagConstraints cft = new GridBagConstraints();
		cft.fill = GridBagConstraints.HORIZONTAL; // Zellen in x-Achse ausfuellen
		cft.insets = new Insets(GUIMain.getAbstand() * 2, GUIMain.getAbstand(),	0, GUIMain.getAbstand());
		cft.anchor = GridBagConstraints.NORTHWEST; // Ausrichtung oben

		cft.gridx = 0; // Spalte 1
		cft.gridy = 0; // Zeile 1
		plSliderLines.add(slFl1, cft); 
		cft.gridx = 1; // Spalte 2
		cft.gridy = 0; // Zeile 1
		plSliderLines.add(lbLine1, cft);

		cft.gridx = 0; // Spalte 1
		cft.gridy = 1; // Zeile 2
		plSliderLines.add(slFl2, cft); 
		cft.gridx = 1; // Spalte 2
		cft.gridy = 1; // Zeile 2
		plSliderLines.add(lbLine2, cft); 

		cft.gridx = 0; // Spalte 1
		cft.gridy = 2; // Zeile 3
		plSliderLines.add(slFl3, cft); 
		cft.gridx = 1; // Spalte 2
		cft.gridy = 2; // Zeile 3
		plSliderLines.add(lbLine3, cft); 

		cft.gridx = 0; // Spalte 1
		cft.gridy = 3; // Zeile 4
		plSliderLines.add(slFl4, cft);
		cft.gridx = 1; // Spalte 2
		cft.gridy = 3; // Zeile 4
		plSliderLines.add(lbLine4, cft);

		cft.gridx = 0; // Spalte 1
		cft.gridy = 4; // Zeile 5
		plSliderLines.add(slFl5, cft); 
		cft.gridx = 1; // Spalte 2
		cft.gridy = 4; // Zeile 5
		plSliderLines.add(lbLine5, cft); 

		cft.gridx = 0; // Spalte 1
		cft.gridy = 5; // Zeile 6
		plSliderLines.add(slFl6, cft);
		cft.gridx = 1; // Spalte 2
		cft.gridy = 5; // Zeile 6
		plSliderLines.add(lbLine6, cft); 

		// BOX for buttons
		Box btFbox = Box.createHorizontalBox();
		btFbox.add(btFsave);
		btFbox.add(Box.createHorizontalStrut(2 * GUIMain.getAbstand()));
		btFbox.add(btFcan);

		// position of components
		this.plQuestion.setLayout(new GridBagLayout());
		GridBagConstraints cf = new GridBagConstraints();
		cf.fill = GridBagConstraints.HORIZONTAL; // Zellen in x-Achse ausfuellen
		cf.insets = new Insets(GUIMain.getAbstand(), GUIMain.getAbstand(), 0,GUIMain.getAbstand());
		cf.anchor = GridBagConstraints.NORTHWEST; // Ausrichtung oben

		cf.gridx = 0; // Spalte 1
		cf.gridy = 0; // Zeile 1
		// plQuestion.add(lbFuser, cf); // label Benutzer
		cf.gridx = 1; // Spalte 2
		cf.gridy = 0; // Zeile 1
		// plQuestion.add(tfFuser, cf); // TextField Benutzer
		cf.gridx = 2; // Spalte 3
		cf.gridy = 0; // Zeile 1
		// plQuestion.add(, cf); // Leer
		cf.gridx = 3; // Spalte 4
		cf.gridy = 0; // Zeile 1
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 0; // Zeile 1
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 1; // Zeile 2
		// plQuestion.add(lbFdate, cf); // Label Datum
		cf.gridx = 1; // Spalte 2
		cf.gridy = 1; // Zeile 2
		// plQuestion.add(tfFdate, cf); // TextField Datum
		cf.gridx = 2; // Spalte 3
		cf.gridy = 1; // Zeile 2
		// plQuestion.add(, cf); // Leer
		cf.gridx = 3; // Spalte 4
		cf.gridy = 1; // Zeile 2
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 1; // Zeile 2
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 2; // Zeile 3
		plQuestion.add(lbFcategory, cf); // Label Kategorie
		cf.gridx = 1; // Spalte 2
		cf.gridy = 2; // Zeile 3
		plQuestion.add(spFcategory, cf); // Liste Kategorie
		cf.gridx = 2; // Spalte 3
		cf.gridy = 2; // Zeile 3
		plQuestion.add(btFnewCategory, cf); // Button Neue Kategorie
		cf.gridx = 3; // Spalte 4
		cf.gridy = 2; // Zeile 3
		cf.gridwidth = 2;
		plQuestion.add(plUserDate, cf); // Panel mit Username und Datum
		cf.gridx = 4; // Spalte 5
		cf.gridy = 2; // Zeile 3
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 3; // Zeile 4
		plQuestion.add(lbFpublic, cf); // Label oeffentlich
		cf.gridx = 1; // Spalte 2
		cf.gridy = 3; // Zeile 4
		plQuestion.add(cbFpublic, cf); // CheckBox oeffentlich
		cf.gridx = 2; // Spalte 3
		cf.gridy = 3; // Zeile 4
		// plQuestion.add(, cf); // Leer
		cf.gridx = 3; // Spalte 4
		cf.gridy = 3; // Zeile 4
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 3; // Zeile 4
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 4; // Zeile 5
		plQuestion.add(lbFtitle, cf); // Label Titel Frage
		cf.gridx = 1; // Spalte 2
		cf.gridy = 4; // Zeile 5
		cf.gridwidth = 2;
		plQuestion.add(tfFtitle, cf); // TextField Frage
		cf.gridx = 2; // Spalte 3
		cf.gridy = 4; // Zeile 5
		// plQuestion.add(, cf); // Leer
		cf.gridx = 3; // Spalte 4
		cf.gridy = 4; // Zeile 5
		cf.gridheight = 6;
		plQuestion.add(plSliderLines, cf); // Slider Nr. 1
		cf.gridx = 4; // Spalte 5
		cf.gridy = 4; // Zeile 5
		// plQuestion.add(linesFBox, cf); // Slider Nr. 1

		cf.gridx = 0; // Spalte 1
		cf.gridy = 5; // Zeile 6
		cf.gridheight = 1;
		plQuestion.add(lbFquestion, cf); // Label Titel Frage
		cf.gridx = 1; // Spalte 2
		cf.gridy = 5; // Zeile 6
		cf.gridwidth = 2;
		plQuestion.add(spFquestion, cf); // TextArea Frage
		cf.gridx = 2; // Spalte 3
		cf.gridy = 5; // Zeile 6
		// plQuestion.add(slFl2, cf); // Slider Nr. 2
		cf.gridx = 3; // Spalte 4
		cf.gridy = 5; // Zeile 6
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 5; // Zeile 6
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 6; // Zeile 7
		plQuestion.add(lbFana, cf); // Label Analyse
		cf.gridx = 1; // Spalte 2
		cf.gridy = 6; // Zeile 7
		cf.gridwidth = 2;
		plQuestion.add(spFana, cf); // TextArea Analyse
		cf.gridx = 2; // Spalte 3
		cf.gridy = 6; // Zeile 7
		// plQuestion.add(slFl3, cf); // Slider Nr. 3
		cf.gridx = 3; // Spalte 4
		cf.gridy = 6; // Zeile 7
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 6; // Zeile 7
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 7; // Zeile 8
		plQuestion.add(lbFsyn, cf); // Label Synthese
		cf.gridx = 1; // Spalte 2
		cf.gridy = 7; // Zeile 8
		cf.gridwidth = 2;
		plQuestion.add(spFsyn, cf); // TextArea Synthese
		cf.gridx = 2; // Spalte 3
		cf.gridy = 7; // Zeile 8
		// plQuestion.add(slFl3, cf); // Slider Nr. 3
		cf.gridx = 3; // Spalte 4
		cf.gridy = 7; // Zeile 8
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 7; // Zeile 8
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 8; // Zeile 9
		plQuestion.add(lbFback, cf); // Label R�ckmeldung
		cf.gridx = 1; // Spalte 2
		cf.gridy = 8; // Zeile 9
		cf.gridwidth = 2;
		plQuestion.add(spFback, cf); // TextArea R�ckmeldung
		cf.gridx = 2; // Spalte 3
		cf.gridy = 8; // Zeile 9
		// plQuestion.add(slFl4, cf); // Slider Nr. 4
		cf.gridx = 3; // Spalte 4
		cf.gridy = 8; // Zeile 9
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 8; // Zeile 9
		// plQuestion.add(, cf); // Leer

		cf.gridx = 0; // Spalte 1
		cf.gridy = 9; // Zeile 10
		// plQuestion.add(btFsave, cf); // Button Speichern
		cf.gridx = 1; // Spalte 2
		cf.gridy = 9; // Zeile 10
		plQuestion.add(btFbox, cf); // Button L�schen
		cf.gridx = 2; // Spalte 3
		cf.gridy = 9; // Zeile 10
		// plQuestion.add(btFcan, cf); // Button Zur�cksetzen
		cf.gridx = 3; // Spalte 4
		cf.gridy = 9; // Zeile 10
		// plQuestion.add(, cf); // Leer
		cf.gridx = 4; // Spalte 5
		cf.gridy = 9; // Zeile 10
		// plQuestion.add(, cf); // Leer

		return (spQuestion);
	}

	// ********************************************************************************
	// Getters und Setters
	// ********************************************************************************

	public JButton getBtFnewCategory() {
		return btFnewCategory;
	}

	public JButton getBtFsave() {
		return btFsave;
	}

	public JButton getBtFcan() {
		return btFcan;
	}

	public JSlider getSlFl1() {
		return slFl1;
	}

	public JSlider getSlFl2() {
		return slFl2;
	}

	public JSlider getSlFl3() {
		return slFl3;
	}

	public JSlider getSlFl4() {
		return slFl4;
	}

	public JSlider getSlFl5() {
		return slFl5;
	}

	public JSlider getSlFl6() {
		return slFl6;
	}

	public JTextField getTfFdate() {
		return tfFdate;
	}

	public CheckBoxList getLiFcategory() {
		return liFcategory;
	}

	public JCheckBox getCbFpublic() {
		return cbFpublic;
	}

	public JTextField getTfFtitle() {
		return tfFtitle;
	}

	public JTextArea getTaFquestion() {
		return taFquestion;
	}

	public JTextArea getTaFana() {
		return taFana;
	}

	public JTextArea getTaFback() {
		return taFback;
	}

	public JTextField getTfFuser() {
		return tfFuser;
	}

	public ImageIcon getImgLine1() {
		return imgLine1;
	}

	public void setImgLine1(ImageIcon imgLine1) {
		this.imgLine1 = imgLine1;
	}

	public ImageIcon getImgLine2() {
		return imgLine2;
	}

	public void setImgLine2(ImageIcon imgLine2) {
		this.imgLine2 = imgLine2;
	}

	public ImageIcon getImgLine3() {
		return imgLine3;
	}

	public void setImgLine3(ImageIcon imgLine3) {
		this.imgLine3 = imgLine3;
	}

	public ImageIcon getImgLine4() {
		return imgLine4;
	}

	public void setImgLine4(ImageIcon imgLine4) {
		this.imgLine4 = imgLine4;
	}

	public JLabel getLbLine1() {
		return lbLine1;
	}

	public void setLbLine1(JLabel lbLine1) {
		this.lbLine1 = lbLine1;
	}

	public JLabel getLbLine2() {
		return lbLine2;
	}

	public void setLbLine2(JLabel lbLine2) {
		this.lbLine2 = lbLine2;
	}

	public JLabel getLbLine3() {
		return lbLine3;
	}

	public void setLbLine3(JLabel lbLine3) {
		this.lbLine3 = lbLine3;
	}

	public JLabel getLbLine4() {
		return lbLine4;
	}

	public void setLbLine4(JLabel lbLine4) {
		this.lbLine4 = lbLine4;
	}

	public JLabel getLbLine5() {
		return lbLine5;
	}

	public void setLbLine5(JLabel lbLine5) {
		this.lbLine5 = lbLine5;
	}

	public JLabel getLbLine6() {
		return lbLine6;
	}

	public void setLbLine6(JLabel lbLine6) {
		this.lbLine6 = lbLine6;
	}

	public JTextArea getTaFsyn() {
		return taFsyn;
	}

	public void setTaFsyn(JTextArea taFsyn) {
		this.taFsyn = taFsyn;
	}

}
